﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace SmartConference.Infrastructure.Interfaces
{
    public interface IBaseRepository<T>
    {
        Task<int> AddAsync(T entity);
        Task<int> AddRangeAsync(IList<T> list);
        Task<T> GetAsync(Expression<Func<T, bool>> expression);
        IQueryable<T> GetAll();
        IQueryable<T> GetAll(Expression<Func<T, bool>> expression);
        Task<int> UpdateAsync(T entity);
        Task<int> UpdateRangeAsync(IList<T> list);
        Task<int> DeleteAsync(T entity);
        Task<int> DeleteRange(IList<T> list);
    }
}
